package com.dreem.decorator.service;

/**
 * @program: DesignParrtern
 * @description: 装饰者
 * @author: Peng
 * @create: 2021-02-15  10:13
 **/
public abstract class Decorator extends Drink {
    private Drink drink;

    public Decorator(Drink drink) {
        this.drink = drink;
    }

    public String getDescription(){
        return this.drink.getDescription() + " && " + this.getDes();
    }
    public float cost(){
        return this.drink.cost() + this.getPrice();
    }
}
